package com.example.demo.service.impl;

import com.baomidou.mybatisplus.core.conditions.AbstractWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.example.demo.bean.StudentVO;
import com.example.demo.entity.Student;
import com.example.demo.mapper.StudentMapper;
import com.example.demo.service.IStudentService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author 自动
 * @since 2019-01-14
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements IStudentService {
        @Autowired
        StudentMapper studentMapper;
    public   List<StudentVO>  getScoreById(String s) {
        List<StudentVO> studentScore = studentMapper.getStudentScore(s);
        return  studentScore;
    }


    public   List<Student>  getSPage() {
        Page<Student> page = new Page<>(2,3);
        List<Student> page1 = studentMapper.getPage(page);
        //AbstractWrapper entityWrapper = new QueryWrapper(page);
    


        return  page1;
    }



}
